<!doctype html>



  


<html class="theme-next muse use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.1" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Hadoop," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.1" />






<meta name="description" content="简介&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;HDFS（Hadoop Distributed File System ）Hadoop分布式文件系统。是根据google发表的论文翻版的。论文为GFS（Google File System）Google 文件系统（中文，英文）。 HDFS有很多特点： 保存多个副本，且提供容错机制，副本丢失或宕机自动">
<meta name="keywords" content="Hadoop">
<meta property="og:type" content="article">
<meta property="og:title" content="【Hadoop】HDFS的运行原理">
<meta property="og:url" content="https://hcldirgit.github.io/2017/09/03/Hadoop/7. 【Hadoop】HDFS的运行原理/index.html">
<meta property="og:site_name" content="失落的乐章">
<meta property="og:description" content="简介&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;HDFS（Hadoop Distributed File System ）Hadoop分布式文件系统。是根据google发表的论文翻版的。论文为GFS（Google File System）Google 文件系统（中文，英文）。 HDFS有很多特点： 保存多个副本，且提供容错机制，副本丢失或宕机自动">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="https://github.com/hcldirgit/image/blob/master/HDFS%E7%9A%84%E8%BF%90%E8%A1%8C%E5%8E%9F%E7%90%86/01.jpeg?raw=true">
<meta property="og:image" content="https://github.com/hcldirgit/image/blob/master/HDFS%E7%9A%84%E8%BF%90%E8%A1%8C%E5%8E%9F%E7%90%86/02.jpeg?raw=true">
<meta property="og:image" content="https://github.com/hcldirgit/image/blob/master/HDFS%E7%9A%84%E8%BF%90%E8%A1%8C%E5%8E%9F%E7%90%86/03.jpeg?raw=true">
<meta property="og:updated_time" content="2017-09-01T08:50:48.036Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="【Hadoop】HDFS的运行原理">
<meta name="twitter:description" content="简介&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;HDFS（Hadoop Distributed File System ）Hadoop分布式文件系统。是根据google发表的论文翻版的。论文为GFS（Google File System）Google 文件系统（中文，英文）。 HDFS有很多特点： 保存多个副本，且提供容错机制，副本丢失或宕机自动">
<meta name="twitter:image" content="https://github.com/hcldirgit/image/blob/master/HDFS%E7%9A%84%E8%BF%90%E8%A1%8C%E5%8E%9F%E7%90%86/01.jpeg?raw=true">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://hcldirgit.github.io/2017/09/03/Hadoop/7. 【Hadoop】HDFS的运行原理/"/>





  <title>【Hadoop】HDFS的运行原理 | 失落的乐章</title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  




<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  ga('create', '85*****1', 'auto');
  ga('send', 'pageview');
</script>


  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?87980c**************99ec5e26fb5";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>











  
  
    
  

  <div class="container sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">失落的乐章</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">技术面前，永远都是学生。</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-message">
          <a href="/message" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-external-link"></i> <br />
            
            留言
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://hcldirgit.github.io/2017/09/03/Hadoop/7. 【Hadoop】HDFS的运行原理/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="失落的乐章">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/0.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="失落的乐章">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">【Hadoop】HDFS的运行原理</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-09-03T02:02:06+08:00">
                2017-09-03
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="简介"><a href="#简介" class="headerlink" title="简介"></a>简介</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>HDFS</strong>（Hadoop Distributed File System ）Hadoop分布式文件系统。是根据google发表的论文翻版的。论文为GFS（Google File System）Google 文件系统（中文，英文）。</p>
<h3 id="HDFS有很多特点："><a href="#HDFS有很多特点：" class="headerlink" title="HDFS有很多特点："></a>HDFS有很多特点：</h3><ol>
<li>保存多个副本，且提供容错机制，副本丢失或宕机自动恢复。默认存3份。</li>
<li>运行在廉价的机器上。</li>
<li>适合大数据的处理。多大？多小？HDFS默认会将文件分割成block，64M为1个block。然后将block按键值对存储在HDFS上，并将键值对的映射存到内存中。如果小文件太多，那内存的负担会很重。</li>
</ol>
<p><img src="https://github.com/hcldirgit/image/blob/master/HDFS%E7%9A%84%E8%BF%90%E8%A1%8C%E5%8E%9F%E7%90%86/01.jpeg?raw=true" alt=""></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;如上图所示，HDFS也是按照Master和Slave的结构。分NameNode、SecondaryNameNode、DataNode这几个角色。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>NameNode</strong>：是Master节点，是大领导。管理数据块映射；处理客户端的读写请求；配置副本策略；管理HDFS的名称空间；</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>SecondaryNameNode</strong>：是一个小弟，分担大哥namenode的工作量；是NameNode的冷备份；合并fsimage和fsedits然后再发给namenode。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>DataNode</strong>：Slave节点，奴隶，干活的。负责存储client发来的数据块block；执行数据块的读写操作。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>热备份</strong>：b是a的热备份，如果a坏掉。那么b马上运行代替a的工作。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>冷备份</strong>：b是a的冷备份，如果a坏掉。那么b不能马上代替a工作。但是b上存储a的一些信息，减少a坏掉之后的损失。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>fsimage</strong>:元数据镜像文件（文件系统的目录树。）</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>edits</strong>：元数据的操作日志（针对文件系统做的修改操作记录）</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>namenode内存中存储的是=fsimage+edits</strong></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;SecondaryNameNode负责定时默认1小时，从namenode上，获取fsimage和edits来进行合并，然后再发送给namenode。减少namenode的工作量。</p>
<h2 id="工作原理"><a href="#工作原理" class="headerlink" title="工作原理"></a>工作原理</h2><h3 id="写操作："><a href="#写操作：" class="headerlink" title="写操作："></a>写操作：</h3><p><img src="https://github.com/hcldirgit/image/blob/master/HDFS%E7%9A%84%E8%BF%90%E8%A1%8C%E5%8E%9F%E7%90%86/02.jpeg?raw=true" alt=""></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;有一个文件FileA，100M大小。Client将FileA写入到HDFS上。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;HDFS按默认配置。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;HDFS分布在三个机架上Rack1，Rack2，Rack3。</p>
<ol>
<li><p>Client将FileA按64M分块。分成两块，block1和Block2;</p>
</li>
<li><p>Client向nameNode发送写数据请求，如图<code>蓝色虚线</code>①——&gt;。</p>
</li>
<li><p>NameNode节点，记录block信息。并返回可用的DataNode，如<code>粉色虚线</code>②———&gt;。</p>
</li>
</ol>
<p>Block1: host2,host1,host3<br>Block2: host7,host8,host4</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;原理：</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;NameNode具有RackAware机架感知功能，这个可以配置。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;若client为DataNode节点，那存储block时，规则为：副本1，同client的节点上；副本2，不同机架节点上；副本3，同第二个副本机架的另一个节点上；其他副本随机挑选。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;若client不为DataNode节点，那存储block时，规则为：副本1，随机选择一个节点上；副本2，不同副本1，机架上；副本3，同副本2相同的另一个节点上；其他副本随机挑选。</p>
<ol>
<li>client向DataNode发送block1；发送过程是以流式写入。</li>
</ol>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;流式写入过程，</p>
<ul>
<li>1.将64M的block1按64k的package划分;</li>
<li>2.然后将第一个package发送给host2;</li>
<li>3.host2接收完后，将第一个package发送给host1，同时client想host2发送第二个package；</li>
<li>4.host1接收完第一个package后，发送给host3，同时接收host2发来的第二个package。</li>
<li>5.以此类推，如图红线实线所示，直到将block1发送完毕。</li>
<li>6.host2,host1,host3向NameNode，host2向Client发送通知，说“消息发送完了”。如图粉红颜色实线所示。</li>
<li>7.client收到host2发来的消息后，向namenode发送消息，说我写完了。这样就真完成了。如图黄色粗实线</li>
<li>8.发送完block1后，再向host7，host8，host4发送block2，如图蓝色实线所示。</li>
<li>9.发送完block2后，host7,host8,host4向NameNode，host7向Client发送通知，如图浅绿色实线所示。</li>
<li>10.client向NameNode发送消息，说我写完了，如图黄色粗实线。。。这样就完毕了。</li>
</ul>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>分析</strong>，通过写过程，我们可以了解到：</p>
<ul>
<li>写1T文件，我们需要3T的存储，3T的网络流量贷款。</li>
<li>在执行读或写的过程中，NameNode和DataNode通过HeartBeat进行保存通信，确定DataNode活着。如果发现DataNode死掉了，就将死掉的DataNode上的数据，放到其他节点去。读取时，要读其他节点去。</li>
<li>挂掉一个节点，没关系，还有其他节点可以备份；甚至，挂掉某一个机架，也没关系；其他机架上，也有备份。</li>
</ul>
<h2 id="读操作："><a href="#读操作：" class="headerlink" title="读操作："></a>读操作：</h2><p><img src="https://github.com/hcldirgit/image/blob/master/HDFS%E7%9A%84%E8%BF%90%E8%A1%8C%E5%8E%9F%E7%90%86/03.jpeg?raw=true" alt=""></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;读操作就简单一些了，如图所示，client要从datanode上，读取FileA。而FileA由block1和block2组成。 </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;那么，读操作流程为：</p>
<ol>
<li><p>client向namenode发送读请求。</p>
</li>
<li><p>namenode查看Metadata信息，返回fileA的block的位置。<br>block1:host2,host1,host3<br>block2:host7,host8,host4    </p>
</li>
<li><p>block的位置是有先后顺序的，先读block1，再读block2。而且block1去host2上读取；然后block2，去host7上读取；</p>
</li>
</ol>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;上面例子中，client位于机架外，那么如果client位于机架内某个DataNode上，例如,client是host6。那么读取的时候，遵循的规律是：<br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>优选读取本机架上的数据</strong>。</p>
<h2 id="HDFS中常用到的命令"><a href="#HDFS中常用到的命令" class="headerlink" title="HDFS中常用到的命令"></a>HDFS中常用到的命令</h2><h3 id="1、hadoop-fs"><a href="#1、hadoop-fs" class="headerlink" title="1、hadoop fs"></a>1、hadoop fs</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div></pre></td><td class="code"><pre><div class="line">hadoop fs -ls /  </div><div class="line">hadoop fs -lsr  </div><div class="line">hadoop fs -mkdir /user/hadoop  </div><div class="line">hadoop fs -put a.txt /user/hadoop/  </div><div class="line">hadoop fs -get /user/hadoop/a.txt /  </div><div class="line">hadoop fs -cp src dst  </div><div class="line">hadoop fs -mv src dst  </div><div class="line">hadoop fs -cat /user/hadoop/a.txt  </div><div class="line">hadoop fs -rm /user/hadoop/a.txt  </div><div class="line">hadoop fs -rmr /user/hadoop/a.txt  </div><div class="line">hadoop fs -text /user/hadoop/a.txt  </div><div class="line">hadoop fs -copyFromLocal localsrc dst <span class="comment">#与hadoop fs -put功能类似。  </span></div><div class="line">hadoop fs -moveFromLocal localsrc dst <span class="comment">#将本地文件上传到hdfs，同时删除本地文件。</span></div></pre></td></tr></table></figure>
<h3 id="2、hadoop-fsadmin"><a href="#2、hadoop-fsadmin" class="headerlink" title="2、hadoop fsadmin"></a>2、hadoop fsadmin</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">hadoop dfsadmin -report  </div><div class="line">hadoop dfsadmin -safemode enter | leave | get | <span class="built_in">wait</span>  </div><div class="line">hadoop dfsadmin -setBalancerBandwidth 1000</div></pre></td></tr></table></figure>
<h3 id="3、hadoop-fsck"><a href="#3、hadoop-fsck" class="headerlink" title="3、hadoop fsck"></a>3、hadoop fsck</h3><h3 id="4、start-balancer-sh"><a href="#4、start-balancer-sh" class="headerlink" title="4、start-balancer.sh"></a>4、start-balancer.sh</h3>
      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Hadoop/" rel="tag"># Hadoop</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/09/03/Hadoop/5. HDFS 原理、架构与特性介绍/" rel="next" title="HDFS 原理、架构与特性介绍">
                <i class="fa fa-chevron-left"></i> HDFS 原理、架构与特性介绍
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/09/03/Hadoop/6. HDFS原理分析—— 基本概念/" rel="prev" title="HDFS原理分析—— 基本概念">
                HDFS原理分析—— 基本概念 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/0.png"
               alt="失落的乐章" />
          <p class="site-author-name" itemprop="name">失落的乐章</p>
           
              <p class="site-description motion-element" itemprop="description">失落的乐章的Blog</p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/">
                <span class="site-state-item-count">627</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/tags/index.html">
                <span class="site-state-item-count">38</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/hcldirgit" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#简介"><span class="nav-number">1.</span> <span class="nav-text">简介</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#HDFS有很多特点："><span class="nav-number">1.1.</span> <span class="nav-text">HDFS有很多特点：</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#工作原理"><span class="nav-number">2.</span> <span class="nav-text">工作原理</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#写操作："><span class="nav-number">2.1.</span> <span class="nav-text">写操作：</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#读操作："><span class="nav-number">3.</span> <span class="nav-text">读操作：</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#HDFS中常用到的命令"><span class="nav-number">4.</span> <span class="nav-text">HDFS中常用到的命令</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1、hadoop-fs"><span class="nav-number">4.1.</span> <span class="nav-text">1、hadoop fs</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2、hadoop-fsadmin"><span class="nav-number">4.2.</span> <span class="nav-text">2、hadoop fsadmin</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3、hadoop-fsck"><span class="nav-number">4.3.</span> <span class="nav-text">3、hadoop fsck</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4、start-balancer-sh"><span class="nav-number">4.4.</span> <span class="nav-text">4、start-balancer.sh</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">失落的乐章</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Muse
  </a>
</div>


        

        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.1"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.1"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.1"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.1"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.1"></script>



  


  




	





  





  





  






  





  

  

  

  

  

  

</body>
</html>
